Field of the Invention
The present invention relates to an image processing apparatus, an imaging apparatus, and an image processing method that are for encoding an image.
Description of the Related Art
In recent years, in the field of video encoding, there has been known a technique of varying image quality by varying a compression ratio for each region within an image. Japanese Patent Laid-Open No. 6-284395 discloses reducing data capacity without deteriorating video quality, by varying quantization processing between the inside and the outside of a region of a central portion of an image in such a manner that the image quality of a video of an image central portion becomes high and the image quality of a video of a peripheral portion becomes low.
Meanwhile, there has been conventionally known, as code amount control, the control of determining a quantization parameter to be applied to the next image, in such a manner that a generated code amount is equal to a target code amount, based on a code amount obtained until just before the parameter determination. The code amount control is referred to as “Constant Bit Rate control (CBR control)” because an image is encoded at a constant bit rate (CBR).
In some cases, so-called “region-based image quality control” is performed during the CBR control. More specifically, in the region-based image quality control, the image quality of the inside of a specified region is made higher than the image quality of the outside of the specified region. In such cases, a bit rate is kept constant while varying image quality between the inside and the outside of the specified region. Nevertheless, if the size of the specified region rapidly changes by changing an imaging direction of a camera, for example, a bit rate may instantaneously become very large even during the CBR control.